﻿using System;
using System.Collections.Generic;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;

namespace IT_Project_Monopoly
{
    public partial class PlayerListItem : System.Web.UI.UserControl
    {
        public void setActive(Boolean active)
        {
            if (active)
            {
                pItem.Style.Add(HtmlTextWriterStyle.BackgroundColor, "#8AA856");
                pItem.Style.Add(HtmlTextWriterStyle.Color, "#FFF");
            }
            else
            {
                pItem.Style.Add(HtmlTextWriterStyle.BackgroundColor, "transparent");
                pItem.Style.Add(HtmlTextWriterStyle.Color, "#000");
            }
        }

        public string PlayerName
        {
            set
            {
                playerItemName.Text = value;
            }
            get
            {
                return playerItemName.Text;
            }
        }

        public float PlayerMoney
        {
            set
            {
                playerItemMoney.Text = Convert.ToString(value);
            }
            get
            {
                return float.Parse(playerItemMoney.Text);
            }
        }

        public int PlayerPoints
        {
            set
            {
                playerItemPoints.Text = Convert.ToString(value);
            }
            get
            {
                return int.Parse(playerItemPoints.Text);
            }
        }
    }
}